#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#pragma warning(disable:4996)
int main() {
    char arr[14];
    char mod[12] = "0123456789X";
    int i = 1;
    int j=0;
    int sum=0;
    scanf_s("%c", arr);
    for (i = 0; i < 12; i++) {
        if (arr[i] == '-')
            continue;
        sum = sum + (arr[i] - 48) * j++;
    }
    if (mod[sum % 11] == arr[12]) printf("Right");
    else
        arr[12] = mod[sum % 11];
    printf("%c", arr[12]);
    return 0;
}